using System;
using System.Collections.Generic;
using System.Text;
using FluentNHibernate.Mapping;
using NH_Entity;

namespace NH_Map
{


    public class QHY_RoleMap : ClassMap<QHY_Role>
    {

        public QHY_RoleMap()
        {
            Table("QHY_Roles");
            LazyLoad();
            Id(x => x.RoleID).GeneratedBy.Identity().Column("RoleID");
            Map(x => x.RoleName).Column("RoleName").Not.Nullable().Length(30);
            Map(x => x.RoleDescription).Column("RoleDescription").Length(50);
            HasMany(x => x.QHY_Users).KeyColumn("UserID");

        }
    }
}
